import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] =  [
  {
    path: '/',
    redirect: '/rich-text'
  },
  {
    path: '/rich-text',
    name: 'RichText',
    component: () => import('@/views/rich-text/RichText.vue'),
    meta: {
      title: '富文本'
    }
  },
  {
    path: '/drag-sort',
    name: 'DragSort',
    component: () => import('@/views/drag-sort/DragSort.vue'),
    meta: {
      title: '拖拽排序'
    }
  },
  {
    path: '/create-pdf',
    name: 'DragSort',
    component: () => import('@/views/create-pdf/CreatePdf.vue'),
    meta: {
      title: '生成PDF'
    }
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes: routes
})

export default router